<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>订单详情</title>
		 <meta name="renderer" content="webkit">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
	    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
	    <link rel="stylesheet" href="./css/font.css">
	    <link rel="stylesheet" href="./css/xadmin.css">
	    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
	    <script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
	    <script type="text/javascript" src="./js/xadmin.js"></script>
	</head>
	<body>
		<div class="x-body">
        	<form class="layui-form">
				<div class="layui-form-item">

					<div class="layui-userinfo">
						<table style="font-size: 20px">
							<tr>
								<td>订单编号：</td>
								<td><input style="border:none;outline:medium;" readonly="readonly" class="orderId" /></td>
							</tr>
							<tr>
								<td>下单时间：</td>
								<td><input style="border:none;outline:medium;" readonly="readonly" class="orderTime" /></td>
							</tr>
							<tr>
								<td>车牌号：</td>
								<td><input style="border:none;outline:medium;" readonly="readonly" class="carPlate" /></td>
							</tr>
							<tr>
								<td>客户姓名：</td>
								<td><input style="border:none;outline:medium;" readonly="readonly" class="customerName" /></td>
							</tr>
							<tr>
								<td>联系方式：</td>
								<td><input style="border:none;outline:medium;" readonly="readonly" class="customerPhone" /></td>
							</tr>
							<tr>
								<td>订单状态：</td>
								<td><input style="border:none;outline:medium;" readonly="readonly" class="orderStatus" /></td>
							</tr>
							<tr>
								<td>维修计划状态：</td>
								<td><input style="border:none;outline:medium;" readonly="readonly" class="listStatus" /></td>
							</tr>
							<tr>
								<td>维修状态：</td>
								<td><input style="border:none;outline:medium;" readonly="readonly" class="repairStatus" /></td>
							</tr>
							<tr>
								<td>所出故障：</td>
								<td><input style="border:none;outline:medium;" readonly="readonly" class="carFalse" /></td>
							</tr>
						</table>
					</div>
				</div>
	          <div class="layui-form-item">
	              <label for="L_repass" class="layui-form-label"></label>
	              <button  class="layui-btn" lay-filter="add" lay-submit="">
	         返回列表
	              </button>
	          </div>
      		</form>
    	</div>
    	
    	<script>

            $(function () {
                $.ajax({
                    url:"http://admin.516code.cn/backstage/queryAllOrder.do",
                    type:"post",
                    dataType:"json",
                    success:function (data) {
                        for (i in data.data){
                            var str;
                            str='<td><div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id=\'+i+\'><i class="layui-icon">&#xe605;</i></div></td>'
                                +'<td>'+data.data[i].orderId+'</td>'+'<td>'+data.data[i].orderTime+'</td>'
                                +'<td>'+data.data[i].carPlate+'</td>'+'<td>'+data.data[i].customerName+'</td>'
                                +'<td>'+data.data[i].customerPhone+'</td>'+'<td>'+data.data[i].orderStatus+'</td>'
                                +'<td>'+data.data[i].listStatus+'</td>'+'<td>'+data.data[i].repairStatus+'</td>'
                                +'<td>'+$(".td-manage").html()+'</td>'
                            $("#tal").append('<tr>'+str+'</tr>')
                        }
                    }
                })
            })

	        layui.use(['form','layer'], function(){
	            $ = layui.jquery;
	          var form = layui.form
	          ,layer = layui.layer;
	        
	
	          //监听提交
	          form.on('submit(add)', function(data){
	            console.log(data);
	            //发异步，把数据提交给php
	           // layer.alert("增加成功", {icon: 6},function () {
	                // 获得frame索引
	                var index = parent.layer.getFrameIndex(window.name);
	                //关闭当前frame
	                parent.layer.close(index);
	            //});
	            return false;
	          });
	          
	          
	        });
    </script>
    
	</body>
</html>
